<div class="wrap">
{if $smarty.cookies.message != NULL}
	<div id="ajaxResponse1" class="ajaxResponse" style="display:block">{$smarty.cookies.message}</div>
{/if}
<h2>{if $smarty.get.act eq "newgallery"}Add{else}Edit{/if} Gallery</h2>
<form name="addgallery" id="addgallery" method="post" >
	<input type="hidden" name="act" value="{$smarty.get.act}" />
    {if $smarty.get.act eq "editgallery"}
    <input type="hidden" name="gallery_id" value="{$smarty.get.id}" />
    {/if}
	<table class="adminform" width="100%" cellspacing="2" cellpadding="5">
		<tr>
			<th width="33%" scope="row" valign="middle">
			{TranslateTag}B_LABEL_NAME{/TranslateTag}:</th>
			<td width="67%">
			<input name="gallery_name" id="gallery_name" type="text" value="{$GALLERY_ONE->gallery_name}" size="40" /></td>
		</tr>
        <tr>
			<th width="33%" scope="row" valign="middle">
			Slide Type:</th>
			<td width="67%">
				<select name="slide_id">
                	{foreach name=cat from=$SLIDE item=item}
                    	<option value="{$item->slide_id}" {if $GALLERY_ONE->slide_id eq $item->slide_id}selected="selected"{/if}>{$item->name_slide}</option>
                    {/foreach}
                </select> 	
            </td>
		</tr>
		<tr>
			<th scope="row" valign="top">
			{TranslateTag}B_LABEL_DESCRIPTION{/TranslateTag}:</th>
			<td>
            	<textarea name="gallery_description" id="gallery_description" rows="5" cols="50" style="width: 90%;">{$GALLERY_ONE->description}</textarea>
            </td>
		</tr>
	</table>
	<p class="submit" align = "right">
		<input type="submit" name="submit" value="{if $smarty.get.act eq 'newgallery'}Add{else}Edit{/if} Gallery &raquo;" />
	</p>
</form>

</div>